import 'package:flutter/material.dart';

class ActionIconButton extends StatelessWidget {
  final void Function() onTap;
  final IconData icon;
  final Color? color;

  const ActionIconButton({
    super.key,
    required this.onTap,
    required this.icon,
    this.color,
  });

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.symmetric(vertical: 2),
      child: Material(
        color: Colors.black.withOpacity(0.3),
        shape: const CircleBorder(),
        elevation: 6,
        shadowColor: Colors.black.withOpacity(0.45),
        child: InkWell(
          customBorder: const CircleBorder(),
          onTap: onTap,
          child: Padding(
            padding: const EdgeInsets.all(8.0),
            child: Icon(icon, color: color ?? Colors.white, size: 23),
          ),
        ),
      ),
    );
  }
}
